package com.visceb.backstage.controller;
import com.visceb.backstage.dao.tcpRepository;
import com.visceb.backstage.entity.tcplog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("tcplog")
@CrossOrigin()
public class tcplogController {
    @Autowired
    private tcpRepository tcprepository;


    @RequestMapping(value ="/tcpAllUplinklength", method = RequestMethod.GET)
    @ResponseBody
//    public List<tcplog> findUplink(int uplinklength) {
//        return tcprepository.finderror(uplinklength);
//    }
    public List<tcplog> findUplink() {
        return tcprepository.finderror();
    }
    @GetMapping("/tcpAllDownlinklength")
    @ResponseBody
    public List<tcplog> findDownlink() {
        return tcprepository.finderror1();
    }
}
